//
//  NSArray+Extension.m
//  CSJQQMusic
//
//  Created by ya on 12/19/16.
//  Copyright © 2016 ya. All rights reserved.
//

#import "NSArray+Extension.h"

@implementation NSArray (Extension)
- (void)sj_operate:(Operate)operate {
    [self enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        operate(obj, idx);
    }];
}

- (NSString *)description {

    NSMutableString *description = [NSMutableString new];
    [description appendFormat:@"\n"];
    [self enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        [description appendFormat:@"%@\n", obj];
    }];
    [description appendFormat:@"\n"];
    return description;
}

@end
